package com.puboot.common.config;

import com.aliyun.dysmsapi20170525.Client;
import com.aliyun.teaopenapi.models.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created with IntelliJ IDEA.
 * User: 梁亮
 * Date: 2021/11/12
 * Time: 14:42
 * To change this template use File | Settings | File Templates.
 * Description:
 */
@Configuration
public class SMSConfig {

    @Bean
    public Client Client() throws Exception {
        Config config = new Config()
                // 您的AccessKey ID
                .setAccessKeyId("LTAI5tF34BP1gjQfmnXH6kWx")
                // 您的AccessKey Secret
                .setAccessKeySecret("2oNZJ3Mmt8ieGtCn0YhvSNmg5VLHZf");
        // 访问的域名
        config.endpoint = "dysmsapi.aliyuncs.com";
        return new Client(config);
    }

}